<template>
    <div class="editor-view">
        <div class="content">
            <div class="input">
                {{ model }}
            </div>
        </div>


        <!-- <codemirror v-model="model.controlsJsonStr" :placeholder="editorPlaceholder" style="height:100%"
            :autofocus="true" :indent-with-tab="true" :tabSize="tabSize" :extensions="extensions"
            :scrollbarStyle="null" /> -->
    </div>
</template>

<script setup>
import { Codemirror } from "vue-codemirror";
import { json } from "@codemirror/lang-json";
const extensions = ref(json());
const model = defineModel();
</script>
<style lang="scss">
.editor-view {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 5px 5px;

    .content {
        overflow: hidden;
        background-color: #eee;
        padding: 5px 5px;
        border-radius: 7px;

        .input {
            padding: 10px;
            height: calc(100% - 20px);
            overflow: auto;

            &::-webkit-scrollbar-thumb {
                backdrop-filter: blur(5px);
                background-color: rgba(23, 23, 23, 0.3);
            }

            &::-webkit-scrollbar {
                background-color: transparent;
            }
        }
    }


    .ͼ1 .cm-scroller {
        &::-webkit-scrollbar-thumb {
            backdrop-filter: blur(5px);
            background-color: rgba(23, 23, 23, 0.3);
        }

        &::-webkit-scrollbar {
            background-color: transparent;
        }
    }
}
</style>